Skip to content

A better fetch with proper errors #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2025
Merged

A better fetch with proper errors #146

merged 1 commit into from
Jul 30, 2025

Conversation

WebReflection
Copy link
Contributor

This MR supersedes #145 by actually improving the underlying library.

It's true that it doesn't reduce much bloat but while writing the other MR I've realized what a "burden" it would be to remember that when fetch fails we want to throw an error (or unhandled Promise rejection) so latest @webreflection/fetch does that, it's 100% code covered, including errors and logs, so I believe it's better to just keep that updated instead of manually searching for all possible fetch in the wild.

/cc @ntoll ... thoughts?

@WebReflection WebReflection requested a review from ntoll July 30, 2025 11:43
@WebReflection
Copy link
Contributor Author

image

example of how things gracefully fail with meaningful errors (there it's a json() that is not actually a json, other tests check against status code and whatnot)

@WebReflection WebReflection merged commit c4e772c into main Jul 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants